/* eslint no-alert: off, no-undef: off, */
if (import.meta.env.PROD) {
    window.onload = () => {
        document.onkeydown = () => {
            const e = window.event || arguments[0];
            if (e.keyCode === 123) {
                alert('The Website Disabled Console');
                return false;
            }
            if (e.ctrlKey && e.shiftKey && e.keyCode === 73) {
                alert('The Website Disabled Console');
                return false;
            }
            if (e.shiftKey && e.keyCode === 121) {
                alert('The Website Disabled Console');
                return false;
            }
            if (e.ctrlKey && e.keyCode === 85) {
                alert('The Website Disabled Console');
                return false;
            }
            return true;
        };
        document.oncontextmenu = () => {
            return false;
        };
    };

    try {
        Object.assign(window.console, {
            log: () => {},
            info: () => {},
            group: () => {},
            groupEnd: () => {},
            time: () => {},
            timeEnd: () => {},
            table: () => {},
        });
    } catch (e) {
        console.warn(e.message);
    }
}

export const VUE_APP_BASE_API = import.meta.env.VITE_BASE_API;
export const VUE_APP_PAY_KEY = import.meta.env.VITE_PAY_KEY;
export const VUE_APP_OSS_POSTER_DIR = import.meta.env.VITE_OSS_POSTER_DIR;
export const VUE_APP_OSS_SVGA_DIR = import.meta.env.VITE_OSS_SVGA_DIR;
